# 开发框架头文件路径
PUBINCL = -I/root/mylib/project/public

# 开发框架cpp文件名，这里直接包含进来，没有采用链接库，是为了方便调试。
PUBLICPP = /root/mylib/project/public/_public.cpp
# 编译参数
CFLAGS= -g

all: procctl checkproc deletefiles gzipfiles ftpgetfiles ftpputfiles fileserver tcpputfiles
gzipfiles: gzipfiles.cpp
	g++ $(CFLAGS) -o gzipfiles gzipfiles.cpp $(PUBLICPP) $(PUBINCL)
	cp gzipfiles ../bin/.

procctl: procctl.cpp
	g++ $(CFLAGS) -o procctl procctl.cpp $(PUBLICPP) $(PUBINCL)
	cp procctl ../bin/.
checkproc: checkproc.cpp
	g++ $(CFLAGS) -o checkproc checkproc.cpp $(PUBLICPP) $(PUBINCL)
	cp checkproc ../bin/.

deletefiles: deletefiles.cpp
	g++ $(CFLAGS) -o deletefiles deletefiles.cpp $(PUBLICPP) $(PUBINCL)
	cp deletefiles ../bin/.

ftpgetfiles:ftpgetfiles.cpp
	g++ $(CFLAGS) -o ftpgetfiles ftpgetfiles.cpp $(PUBLICPP) $(PUBINCL) /root/mylib/project/public/libftp.a /root/mylib/project/public/_ftp.cpp
	cp ftpgetfiles ../bin/.

ftpputfiles:ftpputfiles.cpp
	g++ $(CFLAGS) -o ftpputfiles ftpputfiles.cpp $(PUBLICPP) $(PUBINCL) /root/mylib/project/public/libftp.a /root/mylib/project/public/_ftp.cpp
	cp ftpputfiles ../bin/.

fileserver:fileserver.cpp
	g++ $(CFLAGS) -o fileserver fileserver.cpp $(PUBLICPP) $(PUBINCL) 
	cp fileserver ../bin/.

tcpputfiles:tcpputfiles.cpp
	g++ $(CFLAGS) -o tcpputfiles tcpputfiles.cpp $(PUBLICPP) $(PUBINCL) 
	cp tcpputfiles ../bin/.

clean:
	rm -f procctl checkproc deletefiles gzipfiles ftpgetfiles ftpputfiles fileserver tcpputfiles